using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.WorkFlow.Entities
{
public partial class TaskDesign
{
readonly static Action<TaskDesign,object>[] _SetValues=new Action<TaskDesign,object>[]{(r,t)=>r.Context=Reflection.ParseObject(t, r.Context),(r,t)=>r.Id=Reflection.ParseObject(t, r.Id),(r,t)=>r.Name=Reflection.ParseObject(t, r.Name),(r,t)=>r.TaskId=Reflection.ParseObject(t, r.TaskId),(r,t)=>r.UpdateDate=Reflection.ParseObject(t, r.UpdateDate),(r,t)=>r.Username=Reflection.ParseObject(t, r.Username),(r,t)=>r.Version=Reflection.ParseObject(t, r.Version)};
readonly static string[] _Columns=new string[]{"Context","Id","Name","TaskId","UpdateDate","Username","Version"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"Context", this.Context);
AppendValue(action,"Id", this.Id);
AppendValue(action,"Name", this.Name);
AppendValue(action,"TaskId", this.TaskId);
AppendValue(action,"UpdateDate", this.UpdateDate);
AppendValue(action,"Username", this.Username);
AppendValue(action,"Version", this.Version);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[7];
cols[0]= RecordColumn.Column("Context",this.Context);
cols[1]= RecordColumn.Column("Id",this.Id);
cols[2]= RecordColumn.Column("Name",this.Name);
cols[3]= RecordColumn.Column("TaskId",this.TaskId);
cols[4]= RecordColumn.Column("UpdateDate",this.UpdateDate);
cols[5]= RecordColumn.Column("Username",this.Username);
cols[6]= RecordColumn.Column("Version",this.Version);
return cols;
}

}
}

